<html xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
	<title>Gerencia dos Workers</title>
	<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/workers.css"></link>
</h:head>
<h:body>
	<div id="siteLink" style="display:none">#{request.scheme}://#{request.serverName}:#{request.serverPort}#{request.contextPath}</div>
	<div class="wrap">
		<div class="header">
			<div class="background"></div>
			<div class="titulo">
				Processamento distribuído com WebWorkers
			</div>
		</div>
		<div class="menu">
			<ul>
				<li>
					<a id="homeLink" href="#{request.contextPath}/index.jsf">
						Worker
					</a>
				</li>
				<li>
					<a href="#{request.contextPath}/controller.jsf">
						Gerencia
					</a>
				</li>
				<li>
					<a href="#{request.contextPath}/page/mostraMatriz1.jsf">
						Matriz 1
					</a>
				</li>
				<li>
					<a href="#{request.contextPath}/page/mostraMatriz2.jsf">
						Matriz 2
					</a>
				</li>
				<li>
					<a href="#{request.contextPath}/page/result.jsp">
						Resultado
					</a>
				</li>
			</ul>
		</div>
		<div class="container">
			<div class="coluna">
				<h:form>
					<h4>Gerar Matriz</h4>
					<label>Valor mínimo</label>
					<br/>
					<h:inputText value="#{controller.minValue}"></h:inputText>
					<br/>
					<label>Valor máximo</label>
					<br/>
					<h:inputText value="#{controller.maxValue}"></h:inputText>
					<br/>
					<label>Quantidade de colunas (Matriz 1)</label>
					<br/>
					<h:inputText value="#{controller.tamanho1}"></h:inputText>
					<br/>
					<label>Quantidade de linhas (Matriz 1) e colunas (Matriz 2)</label>
					<br/>
					<h:inputText value="#{controller.tamanho2}"></h:inputText>
					<br/>
					<label>Quantidade de linhas (Matriz 2)</label>
					<br/>
					<h:inputText value="#{controller.tamanho3}"></h:inputText>
					<br/>
					<h:commandButton action="#{controller.criarMatrizes}" value="Criar"/>
				</h:form>
			</div>
			<div class="coluna">
				<h4>Ativar workers</h4>
				<label id="status">Parado</label>
				<br/>
				<input type="button" value="Ativar" id="habilitar"/>
				<input type="button" value="Desativar" id="desabilitar"/>
				<br/>
				<br/>
				
				<h4>Andamento</h4>
				<div class="caixa">
					<label>Prontos</label>
					<br/>
					<input id="filaProntos" class="exibeFila" type="text" value="0" readonly="readonly"/>
				</div>
				<div class="caixa">
					<label>Executando</label>
					<br/>
					<input id="filaExecutando" class="exibeFila" type="text" value="0" readonly="readonly"/>
				</div>
				<div class="caixa">
					<label>Finalizados</label>
					<br/>
					<input id="filaFinalizados" class="exibeFila" type="text" value="0" readonly="readonly"/>
				</div>
				<br/>
				
				<h4>Tempo de execução</h4>
				<div class="caixa">
					<label>Tempo:</label>
					<br/>
					<span id="tempo">00:00:00</span>
				</div>
			</div>
			<br/>
			<div class="push"/>
		</div>
		
	</div>
	<div class="footer">
	</div>
	
	<script src="#{request.contextPath}/js/jquery-1.9.1.js" type="text/javascript"></script>
	<script src="#{request.contextPath}/js/script.js" type="text/javascript"></script>
	
</h:body>
</html>